import React, { Component } from "react";
import { CSSTransition } from "react-transition-group";
class Boss extends Component {
  constructor(props) {
    super(props);
    this.state = {
      isShow: true,
    };
  }

  handleToggle() {
    this.setState({
      isShow: !this.state.isShow,
    });
  }

  render() {
    return (
      <div>
        <CSSTransition
          in={this.state.isShow}
          timeout={2000}
          classNames="boss-text"
          unmountOnExit
        >
          <div className="">Boss</div>
          {/* <div className={this.state.isShow ? "show" : "hide"}>
          Boss级人物-孙无空
        </div> */}
        </CSSTransition>
        <div>
          <button onClick={this.handleToggle.bind(this)}>召唤Boss</button>
        </div>
      </div>
    );
  }
}
export default Boss;
